package org.example.model.Command;

import org.example.system.FarmMachine;

public class StartTaskCommand implements Command {
    private FarmMachine machine;
    private String task;

    public StartTaskCommand(FarmMachine machine, String task) {
        this.machine = machine;
        this.task = task;
    }

    public void execute() {
        System.out.println(">>> 执行指令: " + machine.getId() + " 开始执行任务: " + task);
        machine.startTask(task);
    }
}